package me.thinkjet.sso.server.ticket.exception;

/**
 * 
 * @ClassName TicketException
 * @author johnny_zyc
 * @Modified 2013-3-2 下午2:48:14
 * 
 */
public abstract class TicketException extends Exception {

	private static final long serialVersionUID = -6000583436059919480L;

	private String code;

	public TicketException(final String code) {
		this.code = code;
	}

	public TicketException(final String code, final Throwable throwable) {
		super(throwable);
		this.code = code;
	}

	public final String getCode() {
		return (this.getCause() != null) ? this.getCause().toString()
				: this.code;
	}
}
